<?php
/**
 * Created by PhpStorm.
 * User: silenceper
 * Date: 2016/11/24
 * Time: 下午1:59
 */

namespace common\entities\myhtsq;


use common\entities\ConfigEntity;

/**
 * This is the model class for table "myscrm_project_contact".
 *
 * @property string $id
 * @property string $org_id
 * @property string $project_id
 * @property string $user_guid
 * @property integer $user_type
 * @property string $updated_at
 * @property string $created_at
 */
class ProjectContactEntity extends ConfigEntity
{
    const USER_TYPE_DELIVER=1;
    const USER_TYPE_CUSTOME_MANAGER=2;
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_project_contact';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['user_type'], 'integer'],
            [['updated_at', 'created_at'], 'safe'],
            [['id', 'org_id', 'project_id', 'user_guid'], 'string', 'max' => 36],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'pk',
            'org_id' => '租户ID',
            'project_id' => '项目ID',
            'user_guid' => '用户ID',
            'user_type' => '用户类型：1： 交付顾问 2：客户经理',
            'updated_at' => '更新时间',
            'created_at' => 'Created At',
        ];
    }
}